package ycl.security.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import ycl.common.result.Result;
import ycl.common.config.NativeFeignConfig;
import ycl.security.feign.fallback.SystemFeignFallback;
import ycl.system.entity.SysPermission;

import java.util.List;

/**
 * 远程调用: 系统服务
 *
 * @author ycl
 * @date 2022-03-09 15:14:08
 */
@FeignClient(
		value = "ycl-system",
		fallback = SystemFeignFallback.class,
		configuration = NativeFeignConfig.class
)
public interface SystemFeign {

	@GetMapping("/sys-permission/selectByUserId")
	Result<List<SysPermission>> selectPermissionByUserId(@RequestParam("userId") Long userId);
}
